package com.cloud.base.designmode.chain;

//责任链
public abstract class GatewayHandler {
    // 类似于定义一个排序
    private Integer type;
    protected GatewayHandler nextGatewayHandler;

    /**
    * 处理业务逻辑
    */
    public abstract void doService();

    /**
    * 设置下一个GatewayHandler
    *
    * @return
    */
    public void setNextGatewayHandler(GatewayHandler nextGatewayHandler) {
        this.nextGatewayHandler = nextGatewayHandler;
    }
}